package com.jt.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;

@Data
@Accessors(chain = true)//重写了set方法 实现了链式加载
@NoArgsConstructor  //无参构造注解
@AllArgsConstructor //全参构造方法
public class User implements Serializable {
    private String name;
    private String sex;
    private Integer age;
    public User setName(String name){
        this.name=name;
        return this;//当前对象 运行期有效
    }
    public User setSex(String sex){
        this.sex=sex;
        return this;//当前对象 运行期有效
    }
    public User setAge(Integer age){
        this.age=age;
        return this;//当前对象 运行期有效
    }
}
